<template>
	<view class="card_container container">
		<view class="order_wrap" direction="vertical" @slideUp="slideUp" @slideDown="slideDown">
			<view class="order_title">预订成功！</view>
			<view class="order_content">
				先生，已经帮您预订了<text class="color">{{json.preOrderTimeStr}}</text>的<text class="color">Zushi 米其林三星餐厅</text>的<text
				 class="color">{{json.preOrderPeopleNum}}</text>人位置，现在您可以导航到餐厅为您预留的停车位
			</view>
		</view>
		<p-button type="primary" class="park_btn" @click="gotoPark">去停车</p-button>
	</view>
</template>

<script>
	const navigationModule = uni.requireNativePlugin("NavigationModule")
	export default {
		data() {
			return {
				json:{}
			}
		},
		onLoad(options){
			this.json = options;
		},
		methods: {
			gotoPark() {
				navigationModule.openNavigationByGaode("39.9761", "116.3282")
			}
		}
	}
</script>

<style lang="scss" scoped>
	uni-page-body {
		height: 100%;
	}
	.container {
		display: flex;
		flex-direction: column;
		transform: translate3d(0, 0, 0);
		background-color: $background_color_light;
		.order_wrap {
			display: flex;
			width: 100%;
			height: 100%;
			align-items: center;
			flex-direction: column;
			opacity: 0;
			animation: showAn 1s ease forwards;

			.order_title {
				margin-top: 60rpx;
				font-family: $font_family_regular;
				font-size: $font_size_title_medium;
				font-weight: bold;
				color: $h1_light;
				letter-spacing: 2rpx;
			}

			.order_content {
				width: 600rpx;
				font-family: $font_family_regular;
				margin-top: 60rpx;
				color: $h2_light;
				font-size: $font_size_small;
				line-height: 48rpx;

				.color {
					margin: 0 10rpx;
					color: #00aa8c;
					overflow: hidden;
				}
			}
		}

		.park_btn {
			position: fixed;
			left: 50%;
			bottom: 60rpx;
			transform: translateX(-50%);
			z-index: 500;
		}
	}
</style>
